<?php
  include "include/config.inc.php";
  if(isset($_POST['fid']))
  {
    $selLoan = "SELECT a.guaranterId,b.partyName
                  FROM loan a
                  JOIN party b ON a.partyId = b.partyId
                 WHERE a.partyId=".$_POST['fid']."
                 ORDER BY a.loanId DESC";
                 
    $selLoanRes=mysql_query($selLoan);
    $selLoanResNum=mysql_num_rows($selLoanRes);
    $selLoanResRow=mysql_fetch_array($selLoanRes);
    echo $garenter= $selLoanResRow['guaranterId'];
  }
?>
